home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / ifp1s155.zip / PAGE_14.PAS < prev    next >
Pascal/Delphi Source File  |  1992-04-21  |  3KB  |  124 lines

  1. unit page_14;
  2.  
  3. interface
  4.  
  5. uses crt, ifpglobl, ifpcomon;
  6.  
  7. procedure page14;
  8.  
  9. implementation
  10.  
  11. procedure page14;
  12.  
  13. var
  14.   i : byte;
  15.   xbool : boolean;
  16.   xbyte1 : byte;
  17.   xbyte2 : byte;
  18.  
  19.   begin
  20.   caption2('BIOS disk parameters');
  21.   xbool:=true;
  22.   for i:=$00 to $FF do
  23.     with regs do
  24.       begin
  25.       AH:=$08;
  26.       DL:=i;
  27.       intr($13, regs);
  28.       if nocarry(regs) and ((BL > $00) or (i >= $80)) then
  29.         begin
  30.         if xbool then
  31.           begin
  32.           xbool:=false;
  33.           writeln;
  34.           caption3('Unit');
  35.           writeln;
  36.           caption3('Type');
  37.           writeln;
  38.           caption3('Drives');
  39.           writeln;
  40.           caption3('Heads');
  41.           writeln;
  42.           caption3('Cylinders');
  43.           writeln;
  44.           caption3('Sectors/track');
  45.           writeln;
  46.           caption3('Specify bytes');
  47.           writeln;
  48.           caption3('Off time (s)');
  49.           writeln;
  50.           caption3('Bytes/sector');
  51.           writeln;
  52.           caption3('Sectors/track');
  53.           writeln;
  54.           caption3('Gap length');
  55.           writeln;
  56.           caption3('Data length');
  57.           writeln;
  58.           caption3('Gap length for format');
  59.           writeln;
  60.           caption3('Fill byte for format');
  61.           writeln;
  62.           caption3('Head settle time (ms)');
  63.           writeln;
  64.           caption3('On time (ms)');
  65.           writeln;
  66.           xbyte1:=27;
  67.           end;
  68.         if xbyte1 + 10 > twidth then
  69.           begin
  70.           pause1;
  71.           if endit then
  72.             Exit;
  73.           xbyte1:=27;
  74.           window(xbyte1, 4, twidth, tlength - 2);
  75.           clrscr
  76.           end;
  77.         window(xbyte1, 4, xbyte1 + 11, tlength - 2);
  78.         writeln(i);
  79.         if i < $80 then
  80.           case BL of
  81.             $01 : writeln('360KB 5¼"');
  82.             $02 : writeln('1.2MB 5¼"');
  83.             $03 : writeln('720KB 3½"');
  84.         $04 : writeln('1.44MB 3½"');
  85.         $05 : Writeln('2.88MB 3½"')
  86.       else
  87.         writeln('(', hex(BL, 2), ')')
  88.       end
  89.     else
  90.       writeln('fixed disk');
  91.     writeln(DL);
  92.         writeln(DH + 1);
  93.         writeln(cbw(CH, CL shr 6) + 1);
  94.         writeln(CL and $3F);
  95.         if i < $80 then
  96.           begin
  97.           writeln('$', hex(mem[ES : DI], 2), ' $'
  98.             , hex(mem[ES : DI + $0001], 2));
  99.           writeln(longint(mem[ES : DI + $0002]) shl 16 / tick1 : 0
  100.             : 1);
  101.           xbyte2:=mem[ES : DI + $0003];
  102.           case xbyte2 of
  103.             $00 : writeln('128');
  104.             $01 : writeln('256');
  105.             $02 : writeln('512');
  106.             $03 : writeln('1024')
  107.           else
  108.             writeln('(', hex(xbyte2, 4), ')')
  109.           end;
  110.           writeln(mem[ES : DI + $0004]);
  111.           writeln(mem[ES : DI + $0005]);
  112.           writeln(mem[ES : DI + $0006]);
  113.           writeln(mem[ES : DI + $0007]);
  114.           writeln('$', hex(mem[ES : DI + $0008], 2));
  115.           writeln(mem[ES : DI + $0009]);
  116.           writeln(125 * mem[ES : DI + $000A])
  117.           end;
  118.         inc(xbyte1, 13)
  119.         end
  120.       end;
  121.   if xbool then
  122.     writeln('(no disks)')
  123.   end;
  124. end.